 //Eric Leschinski
//A boggle game. 
#ifndef boggleH
#define boggleH

#include<vector>
#include<iostream.h>
#include<fstream.h>
#include<string.h>
#include<conio.h>
#include"stack.h"
using namespace std;

struct vertex{
     char value;         //the letter in the boggle game
     int neighbor[9];    //what characters are to its north, northeast, east, etc.
     int edge[9];        //weather or not you can look in that direction.
     int x, y;
};
struct listwords{
     char chrword[40];
};

class boggle{

public:
     boggle();
     void loadvertexs(char *, char *, char *, char *);
     void confirminput();
     int findwords();
     void displayboard();
     int binarysearch();   
     char *trunkateword(char *word, int amt);
     void clearedges();
     char **getanswers(char **&);
     int getnumanswers();
     int ReturnAllWords(char **&);
     int SizeWord(char *);
     void sortanswerwords();
private:
     void checkrelations(int startfrom, int position1, int position2, int position3);
     int visit(int, int);
     vertex *M;        //a pointer to a matrix.
     int sizeofenglish;   //number of english words
     listwords *english;  //array of english words in memory
     stack<char> *path;   //when we step through all the combonations, this is current spot.
     stack<string> *victorypile;  //Accumulated characters as solutions
     int answercounter;            //the number of solutions found
     char **answerarray;           //a list of strings as solutions.
};
#endif